﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SeizyUtils.Common.Data
{
    abstract class Record : IRecord
    {

        private readonly ColumnModel _columnModel;

        protected abstract void SetColumnValue(IColumn column, object value);

        protected abstract object GetColumnValue(IColumn column);

        protected Record(ColumnModel model)
        {
            _columnModel = model;
        }

        public object GetObject(IColumn column)
        {
            return GetColumnValue(column);
        }

        public void SetObject(IColumn column, object value)
        {
            SetColumnValue(column, value);
        }

        public ColumnModel getColumnModel()
        {
            return _columnModel;
        }
        
    }
}
